package org.su.webadapter.validate;

import javax.validation.constraints.Min;

/**
 * Created by yangchuan on 15/12/22.
 */
public class MinValidator implements IValidator {
    @Override
    public String validate(Object values,Object object){
        Min min = (Min)object;
        if(values == null){
            return null;
        }
        return  (Long.valueOf(values.toString()) >= min.value()) ?  null : min.message();
    }
}
